<?php
class Db_attribute_detail extends MVC_MODEL {
	/**
	 * @var object SQL
	 */
	public $oDb_attribute_detail;
	
	public function __construct(){
		parent::__construct();
		$this->oDb_attribute_detail = new oDb_attribute_detail();
	}
	
	public function getdataAttribute(){
		return $this->oDb_attribute_detail->getdataAttribute($this);
	}
	
	//lay ra name cua attribute
	public function getNameAttribute()
	{
		return $this->oDb_attribute_detail->getNameAttribute($this);
	}
	//lay ra thong tin cua attribute detail theo id cua attribute_detail
	public function getInfoAttribute()
	{
		return $this->oDb_attribute_detail->getInfoAttribute($this->getData('atd_id'));
	}
	
	public function deleteAttribute(){
		return $this->oDb_attribute_detail->delete_att($this->getData('atd_id'));
	}
	/*public function do_insert_new_attribute(){
		return $this->oDb_attribute->doInsert($this->getAllData(),true);
	}
*/	
	public function update_att($attd_id,$att_id,$attd_name, $attd_status){
		return $this->oDb_attribute_detail->update_att($attd_id,$att_id,$attd_name,$attd_status);		
	}
	/*public function insert_att($att_id,$attd_name,$attd_status){
		return $this->oDb_attribute_detail->insert_att($att_id,$attd_name,$attd_status);		
	}*/
	
	public function insert_att()
	{
		return $this->oDb_attribute_detail->doInsert($this->getAllData(),false);
	}
}
?>